home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / vidhrdw / dominos.c < prev    next >
C/C++ Source or Header  |  1998-07-13  |  1KB  |  49 lines

  1. /***************************************************************************
  2.  
  3.   vidhrdw.c
  4.  
  5.   Functions to emulate the video hardware of the machine.
  6.  
  7. ***************************************************************************/
  8.  
  9. #include "driver.h"
  10. #include "vidhrdw/generic.h"
  11.  
  12. /***************************************************************************
  13.  
  14.   Draw the game screen in the given osd_bitmap.
  15.   Do NOT call osd_update_display() from this function, it will be called by
  16.   the main emulation engine.
  17.  
  18. ***************************************************************************/
  19. void dominos_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh)
  20. {
  21.     int offs;
  22.  
  23.     /* for every character in the Video RAM, check if it has been modified */
  24.     /* since last time and update it accordingly. */
  25.     for (offs = videoram_size - 1;offs >= 0;offs--)
  26.     {
  27.         if (dirtybuffer[offs])
  28.         {
  29.             int charcode;
  30.             int sx,sy;
  31.  
  32.             dirtybuffer[offs]=0;
  33.  
  34.             charcode = videoram[offs] & 0x3F;
  35.  
  36.             sx = 8 * (offs % 32);
  37.             sy = 8 * (offs / 32);
  38.             drawgfx(tmpbitmap,Machine->gfx[0],
  39.                     charcode, (videoram[offs] & 0x80)>>7,
  40.                     0,0,sx,sy,
  41.                     &Machine->drv->visible_area,TRANSPARENCY_NONE,0);
  42.         }
  43.     }
  44.  
  45.     /* copy the character mapped graphics */
  46.     copybitmap(bitmap,tmpbitmap,0,0,0,0,&Machine->drv->visible_area,TRANSPARENCY_NONE,0);
  47.  
  48. }
  49.